function MakeActive(classId, buttonId) {
    var x = document.getElementById("th" + classId + "_" + buttonId);
    if (x.className == "btn btn-default") {
        for (var i = 1; i <= 5; i++) {
            var y = document.getElementById("th" + classId + "_" + i);
            y.className = "btn btn-default";
        }
        x.className = "active btn btn-default";
    }
}

function MouseOn(no) {
    for (var i = 0; i < 5; i++) {
        var x = document.getElementById("main" + i);
        x.style.backgroundImage = "url(images/slide" + no + ".jpg)";
    }
}

function MouseOff() {
    for (var i = 0; i < 5; i++) {
        var x = document.getElementById("main" + i);
        x.style.backgroundImage = "url(images/slide" + i + ".jpg)";
    }
}

function zoomin(icon) {
    var h = document.getElementById(icon).style.height.split('px');
    document.getElementById(icon).style.height = (+h[0] + 2) + "px";
}

function zoomout(icon) {
    var h = document.getElementById(icon).style.height.split('px');
    document.getElementById(icon).style.height = (+h[0] - 2) + "px";
}

function ccolor() {
    var x = document.getElementById("logo");
    if (x.src == "https://googledrive.com/host/0b-eskiu4grhzlxffofhlazrouws")
        x.src = "https://googledrive.com/host/0b-ESkiu4GRhZVDlNX1dONWpKdDQ";
    else
        x.src = "https://googledrive.com/host/0b-eskiu4grhzlxffofhlazrouws";
}

function newcolor(col) {
    var x = document.getElementById("new");
    x.src = "images/new" + col + ".png";
}

function rating(i, j, k) {
    for (var y = 1; y <= k; y++) {
        var x = document.getElementById("tb" + i + "_" + j + "_" + y);
        x.style.backgroundColor = "lightgrey";
    }
}

function getrate(i, j, k) {
    for (var y = 1; y <= k; y++) {
        var x = document.getElementById("tb" + i + "_" + j + "_" + y);
        x.style.backgroundColor = "";
    }
}

function DimOn(classId, i) {
    var x = document.getElementById("tb" + classId + "_tile" + i);
    if (x.className == "deactivetile") {
        x.style.opacity = .5;
        x.style.backgroundColor = "black";
    }
}
function DimOff(classId, i) {
    var x = document.getElementById("tb" + classId + "_tile" + i);
    if (x.className == "deactivetile") {
        x.style.opacity = .8;
        x.style.backgroundColor = "#428bca";
    }
}

function SwitchTile(classId, i) {
    for (var j = 0; j < 5; j++) {
        var x = document.getElementById("tb" + classId + "_tile" + j);
        if (x.className = "activetile") {
            x.style.opacity = .5;
            x.style.backgroundColor = "black";
            x.className = "deactivetile";
        }
    }
    var x = document.getElementById("tb" + classId + "_tile" + i);
    x.style.opacity = 1;
    x.style.backgroundColor = "#428bca";
    x.className = "activetile";
}
